package com.xiaoshuidi.cloud.module.contract.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;


/**
 * 管理后台 - 账单 Response VO
 */
@Schema(description = "管理后台 - 账单 Response VO")
@Data
@ToString(callSuper = true)
public class RentOrderVO {

    /**
     * 账单id
     */
    @Schema(description = "账单id", required = true)
    private Long id;
    /**
     * 账单编号
     */
    @Schema(description = "账单编号")
    private String orderNo;

    /**
     * 序号
     */
    @Schema(description = "序号", required = true)
    private Long num;
    /**
     * 业务id 如 合同id 、预定id
     */
    @Schema(description = "业务id 如 合同id 、预定id", required = true)
    @NotNull(message = "业务id 如 合同id 、预定id不能为空")
    private Long businessId;

    /**
     * 公寓id
     */
    @Schema(description = "公寓id", required = true)
    @NotNull(message = "公寓id不能为空")
    private Long apartmentId;

    /**
     * 公寓名称
     */
    @Schema(description = "公寓名称")
    private String apartmentName;

    /**
     * 房间id
     */
    @Schema(description = "房间id")
    private Long roomId;

    /**
     * 房间名称
     */
    @Schema(description = "房间名称")
    private String roomName;

    /**
     * 此订单开始时间
     */
    @Schema(description = "此订单开始时间")
    private LocalDate startTime;

    /**
     * 此订单结束时间
     */
    @Schema(description = "此订单结束时间")
    private LocalDate endTime;

    /**
     * 已收账单总额
     */
    private BigDecimal paidRentUtilities = BigDecimal.ZERO;
    /**
     * 账单总金额
     */
    private BigDecimal totalAmount;

    /**
     * 租金金额
     */
    @Schema(description = "租金金额", required = true)
    private BigDecimal rentAmount;

    /**
     * 押金金额
     */
    @Schema(description = "押金金额", required = true)
    private BigDecimal depositAmount = BigDecimal.ZERO;

    /**
     * 杂费金额
     */
    @Schema(description = "杂费金额", required = true)
    private BigDecimal extrasAmount = BigDecimal.ZERO;

    /**
     * 租金押金金额
     */
    @Schema(description = "租金押金金额", required = true)
    private BigDecimal rentDeposit = BigDecimal.ZERO;

    /**
     * 优惠金额
     */
    @Schema(description = "优惠金额", required = true)
    private BigDecimal discountAmount;

    /**
     * 优惠前原租金
     */
    @Schema(description = "优惠前原租金", required = true)
    private BigDecimal rawAmount = BigDecimal.ZERO;

    /**
     * 原押金
     */
    @Schema(description = "原押金", required = true)
    @NotNull(message = "原押金不能为空")
    private BigDecimal oldDepositAmount;

    /**
     * 租金押金水电气等金额
     */
    @Schema(description = "租金押金水电气等金额", required = true)
    @NotNull(message = "租金押金水电气等金额不能为空")
    private BigDecimal rentUtilities;

    /**
     * 原租金押金水电气等金额
     */
    @Schema(description = "原租金押金水电气等金额")
    private BigDecimal initialRentUtilities;

    /**
     * 支付状态(unpaid 待支付 |payment 已支付|part  部分支付),
     */
    @Schema(description = "支付状态(unpaid 待支付 |payment 已支付|part  部分支付),", required = true)
    @NotNull(message = "支付状态(unpaid 待支付 |payment 已支付|part  部分支付),不能为空")
    private String payStatus;


    /**
     * 此订单支付时间
     */
    @Schema(description = "此订单支付时间", required = true)
    @NotNull(message = "此订单支付时间不能为空")
    private LocalDate oughtPayTime;

    /**
     * 此订单最晚支付时间
     */
    @Schema(description = "此订单最晚支付时间", required = true)
    @NotNull(message = "此订单最晚支付时间不能为空")
    private LocalDate deadlinePayTime;

    /**
     * 此订单实际支付时间
     */
    @Schema(description = "此订单实际支付时间")
    private LocalDateTime actualPayTime;

    /**
     * 结算状态(0, 未结算|1, 已结算),
     */
    @Schema(description = "结算状态(0, 未结算|1, 已结算),", required = true)
    @NotNull(message = "结算状态(0, 未结算|1, 已结算),不能为空")
    private Integer payOutStatus;

    /**
     * 账单类型 default 合同账单| custom 杂费账单| free  免租期账单| meter  抄表账单| carry 结转账单 | owner 业主账单
     */
    @Schema(description = "账单类型 default 合同账单| custom 杂费账单| free  免租期账单| meter  抄表账单| carry 结转账单 | owner 业主账单", required = true)
    @NotNull(message = "账单类型 default 合同账单| custom 杂费账单| free  免租期账单| meter  抄表账单| carry 结转账单 | owner 业主账单不能为空")
    private String orderType;

    /**
     * 账单归属人
     */
    @Schema(description = "账单归属人")
    private Long roommateId;

    /**
     * 账单状态
     */
    private String orderStatus;

    /**
     * 客户姓名
     */
    private String customerName;

    /**
     * 企业单位
     */
    private String companyName;

}
